﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

namespace EzyChoice
{
    [Serializable()]
    public class Criteria : EzcItem
    {

        public Criteria()
        {
        }

        public List<Questionnaire> Choices = new List<Questionnaire>();

        public Criteria(string name)
            : base(name)
        {
        }
        
        protected Criteria(SerializationInfo info, StreamingContext context)
            : base (info, context)
        {
            this.Choices = (List<Questionnaire>)info.GetValue("choices", typeof(List<Questionnaire>));
        }

        public override void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            base.GetObjectData(info, ctxt);
            info.AddValue("choices", this.Choices);
        }
    }
}
